home *** CD-ROM | disk | FTP | other *** search
- page 60,120
- title PRTSC.ASM 1.01
- ;--------------------------------------------------------------
- ; Program : Toggles print screen feature on/off
- ; Version : 1.01
- ; System : IBM PC DOS 2.00
- ; Language : IBM 8088 Macro Assembler
- ; Author : Tom Swan P.O. Box 206 Lititz, PA 17543
- ;--------------------------------------------------------------
- ;01-Aug-84 -ts- start date
- ;
- cseg segment para public 'CODE'
- assume cs:cseg,ds:cseg
- ;
- ;----- Equates
- ;
- cr equ 13 ;ASCII carriage return
- lf equ 10 ;ASCII line feed
- romdata equ 50h ;seg address of ROM BIOS data
- prtstat equ 0 ;offset of status byte
- ;
- ;----- Start of Program
- ;
- org 100h ;standard .COM entry point
- prtsc:
- mov dx,offset progid ;print program identification
- mov ah,9 ;ah=DOS print string$
- int 21h ;call DOS to print string
- push ds ;save data segment register
- mov ax,romdata ;set ds=ROM BIOS
- mov ds,ax ; data segment address
- xor byte ptr ds:[prtstat],1 ;toggle status on(0) / off(1)
- mov bl,ds:[prtstat] ;bl = current status
- pop ds ;restore saved ds register
- ;
- ;----- Display status ON or OFF
- ;
- mov dx,offset statstr ;print status string
- mov ah,9 ;ah=DOS print string$
- int 21h ;call DOS to print string
- mov dx,offset staton ;prepare to print "on"
- or bl,bl ;test current status
- jz prtsc1 ;jump if on (0)
- mov dx,offset statoff ;else print "off"
- prtsc1:
- mov ah,9 ;ah=DOS print string$
- int 21h ;call DOS to print string
- int 20h ;return to DOS
- page
- ;
- ;----- Strings
- ;
- progid db 'PRTSC 1.01',cr,lf
- db '(C) 1984 by Tom Swan',cr,lf,lf,'$'
- statstr db 'PRINT SCREEN is ','$'
- staton db 'on',cr,lf,'$'
- statoff db 'off',cr,lf,'$'
- ;
- cseg ends ;end of segment
- end prtsc ;end program